﻿<controls:ChildWindow x:Class="SilverDesigner.ResourcesWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="600" Height="300" 
           Title="ResourcesWindow">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="3*" />
                <ColumnDefinition Width="2*" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <Image Grid.Column="0" DataContext="{Binding SelectedResource}" Source="{Binding ImageDataSource}" />

            <ListBox Grid.Column="1" ItemsSource="{Binding Resources}" SelectedItem="{Binding SelectedResource, Mode=TwoWay}" DisplayMemberPath="Name">

            </ListBox>

            <StackPanel Grid.Column="2" Orientation="Vertical">
                <Button x:Name="btnAdd" Content="Add" Margin="5" Padding="10" Click="btnAdd_Click" />
                <Button x:Name="btnRemove" Content="Remove" Margin="5" Padding="10" Click="btnRemove_Click" />
            </StackPanel>
        </Grid>

        <!--<Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />-->
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
    </Grid>
</controls:ChildWindow>